#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a[10000],n,i,sum=0;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>a[i];
		if(a[i]%2==0) sum+=a[i];
	}
	cout<<sum;
    return 0;
}

